#检查传入target参数是否位于path列表 位于则返回1
$data modify storage dab:system temp.macro_list set $(NBT_path)

#路径为空或不存在则失败
execute unless data storage dab:system temp.macro_list run return fail

#target
data modify storage dab:system temp.target append value {value:""}
$data modify storage dab:system temp.target[0].value set $(target_NBT_path)

#检查target数值类型是否为选择的类型
$execute store result score #type_check temp run function util:value_type_check/value_type_check {type:"$(type)",path:"from storage dab:system temp.target[0].value"}
execute if score #type_check temp matches ..0 run return run function util:traversal/is_in_list/format_error

#拆出Compound用于Merge对比
function util:traversal/is_in_list/to_list_compound

#遍历merge对比
function util:traversal/is_in_list/merge_test_loop

data remove storage dab:system temp.list
data remove storage dab:system temp.target
scoreboard players reset #success temp
scoreboard players reset #temp1 temp
scoreboard players reset #temp temp

#return
execute if score #success1 temp matches 1.. run return run scoreboard players reset #success1 temp